package com.oracle.oa.action;

import java.util.Map;

import org.apache.struts2.interceptor.SessionAware;

import com.opensymphony.xwork2.ActionSupport;
import com.oracle.oa.biz.PreContractBiz;
import com.oracle.oa.biz.impl.PreContractBizImpl;
import com.oracle.oa.entity.Precontract;


public class PreContractAction extends ActionSupport implements SessionAware {

	public Map<String, Object> session;
	
	private Precontract precontract;
	private Precontract pre;
	
	PreContractBiz pbiz ;
	/**
	 * 添加
	 */
	private void add(){
		pbiz.save(precontract);
	}
	/**
	 * 删除
	 */
	private void delete(){
		pbiz.delete(precontract);
	}
	/**
	 * 更改
	 */
	private void update(){
		pbiz.update(pre);
	}
	/**
	 * 查找所有
	 */
	private void findAll(){
		pbiz.getAll(Precontract.class);
		
	}
	/**
	 * 根据id查找
	 */
	private void findOne(){
		pbiz.getById(Precontract.class, precontract.getPrecontractid());
	}
	
	
	
	public PreContractBiz getPbiz() {
		return pbiz;
	}
	public void setPbiz(PreContractBiz pbiz) {
		this.pbiz = pbiz;
	}
	public Precontract getPrecontract() {
		return precontract;
	}


	public void setPrecontract(Precontract precontract) {
		this.precontract = precontract;
	}


	public Precontract getPre() {
		return pre;
	}


	public void setPre(Precontract pre) {
		this.pre = pre;
	}


	public void setSession(Map<String, Object> arg0) {
		
		this.session=arg0;
		
	}

	
}
